﻿using System;

namespace IOP.DynimicProxy
{
    /// <summary>
    /// 代理创建者函数
    /// </summary>
    public class ProxyCreaterFunc
    {
        /// <summary>
        /// 代理类型
        /// </summary>
        public Type ProxyType { get; }
        /// <summary>
        /// 代理创建者委托
        /// </summary>
        public Delegate ProxyCreateDelegate { get; }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="proxyType"></param>
        /// <param name="delegate"></param>
        public ProxyCreaterFunc(Type proxyType, Delegate @delegate)
        {
            ProxyType = proxyType ?? throw new ArgumentNullException(nameof(proxyType));
            ProxyCreateDelegate = @delegate ?? throw new ArgumentNullException(nameof(@delegate));
        }
    }
}
